package org.msfj.hospital.api;

import com.github.pagehelper.PageInfo;
import org.msfj.common.model.CommonResult;
import org.msfj.hospital.service.HospitalExpertService;
import org.msfj.hospital.vo.HospitalExpertVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Description: 医院科室接口
 * @User: Administrator
 * @Date: 2018/8/19 0019
 */
@RestController
@RequestMapping("api/hospital")
public class HospitalExpertApiController {
    @Autowired
    HospitalExpertService hospitalExpertService;

    /**
     * 根据vo查询医院专家列表
     *
     * @param hospitalExpertVo
     * @param page
     * @param rows
     * @return
     */
    @GetMapping("/listHospitalExpertByVo")
    public CommonResult<PageInfo<HospitalExpertVo>> listHospitalExpertByVo(HospitalExpertVo hospitalExpertVo, Integer page, Integer rows) {
        PageInfo<HospitalExpertVo> byHospitalExpert = hospitalExpertService.getByHospitalExpert(hospitalExpertVo, page, rows);
        return CommonResult.ok(byHospitalExpert);
    }
}
